import React from 'react'
// ===================================================================== Temp
// ===================================================================== Declare
const { $Lazy } = window
// ===================================================================== Lazy
const Modal 	= $Lazy.state(()=>import('@antd/modal'))
// ===================================================================== component
class Index extends React.Component{
	state = {
		content: '',
		event_id: ''
	}
	
	model = {}
	
	open = ({title, event_id}) => {
		this.setState({title, event_id})
		this.modal.open()
	}

	render(){
		const { title, event_id } = this.state
		return <>
			<Modal
				title	= '系统通知'
				width 	= {700}
				height  = {300}
				okText	= { event_id ? '处理' : '确认' }
				noCancel
				onRef	= { ref => this.modal = ref }
				isFullScroll
				closable = {false}
				onOk	= { () => {
					this.modal.close()
					window.location = `#/administrators/workbench/todo/detail?uuid=${event_id}&type=1`
				} }
			>
				<div className='fx xm xc wh pb10'>
					<p>{title}</p>
				</div>
			</Modal>
		</>
	}
}

export default Index